.class public Lcom/netease/newsreader/util/GalleryViewItem;
.super Landroid/widget/TableLayout;
.source "GalleryViewItem.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/netease/newsreader/util/GalleryViewItem$LearnGestureListener;
    }
.end annotation


# instance fields
.field public Image2DocListener:Landroid/view/View$OnClickListener;

.field private db:Landroid/database/sqlite/SQLiteDatabase;

.field private gestureDetector:Landroid/view/GestureDetector;

.field private h:I

.field private mContext:Landroid/content/Context;

.field private mThemeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

.field private map:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation
.end field

.field private screentype:I

.field private set_prefs:Landroid/content/SharedPreferences;

.field private final swipe_max_off_path:I

.field private final swipe_min_distance:I

.field private final swipe_threshold_veloicty:I

.field public voteDoListener:Landroid/view/View$OnClickListener;

.field public voteSeeListener:Landroid/view/View$OnClickListener;

.field private vote_date:Landroid/widget/TextView;

.field private vote_digest:Landroid/widget/TextView;

.field private vote_flag_layout:Landroid/widget/LinearLayout;

.field private vote_image:Landroid/widget/ImageView;

.field private vote_is_can:Landroid/widget/TextView;

.field private vote_question:Landroid/widget/TextView;

.field private vote_submit:Landroid/widget/Button;

.field private w:I


# direct methods
.method public constructor <init>(Landroid/content/Context;ILjava/util/List;)V
    .locals 30
    .parameter "context"
    .parameter "position"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "I",
            "Ljava/util/List",
            "<",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;>;)V"
        }
    .end annotation

    .prologue
    .line 77
    .local p3, labelArray:Ljava/util/List;,"Ljava/util/List<Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;>;"
    invoke-direct/range {p0 .. p1}, Landroid/widget/TableLayout;-><init>(Landroid/content/Context;)V

    .line 46
    const/16 v4, 0x1e0

    move-object/from16 v0, p0

    iput v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->w:I

    .line 47
    const/16 v4, 0xff

    move-object/from16 v0, p0

    iput v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->h:I

    .line 48
    const/4 v4, 0x3

    move-object/from16 v0, p0

    iput v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->screentype:I

    .line 53
    const/16 v4, 0x78

    move-object/from16 v0, p0

    iput v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->swipe_min_distance:I

    .line 54
    const/16 v4, 0xfa

    move-object/from16 v0, p0

    iput v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->swipe_max_off_path:I

    .line 55
    const/16 v4, 0x190

    move-object/from16 v0, p0

    iput v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->swipe_threshold_veloicty:I

    .line 253
    new-instance v4, Lcom/netease/newsreader/util/GalleryViewItem$1;

    move-object/from16 v0, p0

    invoke-direct {v4, v0}, Lcom/netease/newsreader/util/GalleryViewItem$1;-><init>(Lcom/netease/newsreader/util/GalleryViewItem;)V

    move-object/from16 v0, p0

    iput-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->voteDoListener:Landroid/view/View$OnClickListener;

    .line 295
    new-instance v4, Lcom/netease/newsreader/util/GalleryViewItem$2;

    move-object/from16 v0, p0

    invoke-direct {v4, v0}, Lcom/netease/newsreader/util/GalleryViewItem$2;-><init>(Lcom/netease/newsreader/util/GalleryViewItem;)V

    move-object/from16 v0, p0

    iput-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->voteSeeListener:Landroid/view/View$OnClickListener;

    .line 334
    new-instance v4, Lcom/netease/newsreader/util/GalleryViewItem$3;

    move-object/from16 v0, p0

    invoke-direct {v4, v0}, Lcom/netease/newsreader/util/GalleryViewItem$3;-><init>(Lcom/netease/newsreader/util/GalleryViewItem;)V

    move-object/from16 v0, p0

    iput-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->Image2DocListener:Landroid/view/View$OnClickListener;

    .line 78
    move-object/from16 v0, p1

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    .line 79
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    invoke-static {v4}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->getThemeSettingsHelper(Landroid/content/Context;)Lcom/netease/newsreader/util/ThemeSettingsHelper;

    move-result-object v4

    move-object/from16 v0, p0

    iput-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mThemeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    .line 80
    new-instance v4, Landroid/view/GestureDetector;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    new-instance v8, Lcom/netease/newsreader/util/GalleryViewItem$LearnGestureListener;

    move-object/from16 v0, p0

    invoke-direct {v8, v0}, Lcom/netease/newsreader/util/GalleryViewItem$LearnGestureListener;-><init>(Lcom/netease/newsreader/util/GalleryViewItem;)V

    invoke-direct {v4, v5, v8}, Landroid/view/GestureDetector;-><init>(Landroid/content/Context;Landroid/view/GestureDetector$OnGestureListener;)V

    move-object/from16 v0, p0

    iput-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->gestureDetector:Landroid/view/GestureDetector;

    .line 81
    const/4 v4, 0x1

    move-object/from16 v0, p0

    invoke-virtual {v0, v4}, Lcom/netease/newsreader/util/GalleryViewItem;->setOrientation(I)V

    .line 82
    const-string v4, "layout_inflater"

    move-object/from16 v0, p1

    invoke-virtual {v0, v4}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v25

    check-cast v25, Landroid/view/LayoutInflater;

    .line 84
    .local v25, inflater:Landroid/view/LayoutInflater;
    const v4, 0x7f03000a

    const/4 v5, 0x0

    move-object/from16 v0, v25

    invoke-virtual {v0, v4, v5}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v26

    .line 85
    .local v26, layout:Landroid/view/View;
    const v4, 0x7f0c002d

    move-object/from16 v0, v26

    invoke-virtual {v0, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/ImageView;

    move-object/from16 v0, p0

    iput-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_image:Landroid/widget/ImageView;

    .line 86
    const v4, 0x7f0c002e

    move-object/from16 v0, v26

    invoke-virtual {v0, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/TextView;

    move-object/from16 v0, p0

    iput-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_digest:Landroid/widget/TextView;

    .line 87
    const v4, 0x7f0c002f

    move-object/from16 v0, v26

    invoke-virtual {v0, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/LinearLayout;

    move-object/from16 v0, p0

    iput-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_flag_layout:Landroid/widget/LinearLayout;

    .line 88
    const v4, 0x7f0c0171

    move-object/from16 v0, v26

    invoke-virtual {v0, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/TextView;

    move-object/from16 v0, p0

    iput-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_question:Landroid/widget/TextView;

    .line 89
    const v4, 0x7f0c0030

    move-object/from16 v0, v26

    invoke-virtual {v0, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/TextView;

    move-object/from16 v0, p0

    iput-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_is_can:Landroid/widget/TextView;

    .line 90
    const v4, 0x7f0c0031

    move-object/from16 v0, v26

    invoke-virtual {v0, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/TextView;

    move-object/from16 v0, p0

    iput-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_date:Landroid/widget/TextView;

    .line 91
    const v4, 0x7f0c0032

    move-object/from16 v0, v26

    invoke-virtual {v0, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/Button;

    move-object/from16 v0, p0

    iput-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    .line 93
    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/util/GalleryViewItem;->setTheme()V

    .line 95
    const-string v4, "GalleryViewItem"

    new-instance v5, Ljava/lang/StringBuilder;

    const-string v8, "count="

    invoke-direct {v5, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move/from16 v0, p2

    invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v4, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 96
    move-object/from16 v0, p3

    move/from16 v1, p2

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/util/Map;

    move-object/from16 v0, p0

    iput-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->map:Ljava/util/Map;

    .line 97
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    invoke-static {v4}, Lcom/netease/newsreader/util/Tools;->getScreenWidth(Landroid/content/Context;)I

    move-result v6

    .line 98
    .local v6, w:I
    invoke-static {v6}, Lcom/netease/newsreader/util/Tools;->getCutHeadPicHeight(I)I

    move-result v7

    .line 100
    .local v7, h:I
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_image:Landroid/widget/ImageView;

    new-instance v5, Landroid/widget/RelativeLayout$LayoutParams;

    const/4 v8, -0x1

    invoke-direct {v5, v8, v7}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v4, v5}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 102
    new-instance v3, Lcom/netease/newsreader/util/BaseImageDownloader;

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f02010c

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v5

    check-cast v5, Landroid/graphics/drawable/BitmapDrawable;

    invoke-virtual {v5}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v5

    .line 103
    const-string v8, "Y"

    .line 102
    invoke-direct/range {v3 .. v8}, Lcom/netease/newsreader/util/BaseImageDownloader;-><init>(Landroid/content/Context;Landroid/graphics/Bitmap;IILjava/lang/String;)V

    .line 104
    .local v3, basedownlaoder:Lcom/netease/newsreader/util/BaseImageDownloader;
    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v4

    invoke-virtual {v3, v4}, Lcom/netease/newsreader/util/BaseImageDownloader;->setThread(Ljava/lang/Thread;)V

    .line 105
    const/16 v23, 0x0

    .line 106
    .local v23, imgUrl:Ljava/lang/String;
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->map:Ljava/util/Map;

    if-eqz v4, :cond_0

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->map:Ljava/util/Map;

    const-string v5, "imgsrc"

    invoke-interface {v4, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    if-eqz v4, :cond_0

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->map:Ljava/util/Map;

    const-string v8, "imgsrc"

    invoke-interface {v5, v8}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v23

    .line 107
    :cond_0
    if-eqz v23, :cond_1

    invoke-virtual/range {v23 .. v23}, Ljava/lang/String;->length()I

    move-result v4

    if-lez v4, :cond_1

    .line 109
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    move-object/from16 v0, v23

    invoke-static {v0, v4}, Lcom/netease/newsreader/util/PicUtil;->getHeandBitMapURL(Ljava/lang/String;Landroid/content/Context;)Ljava/lang/String;

    move-result-object v23

    .line 111
    :cond_1
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    invoke-static {v4}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v4

    move-object/from16 v0, p0

    iput-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->set_prefs:Landroid/content/SharedPreferences;

    .line 112
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->set_prefs:Landroid/content/SharedPreferences;

    const-string v5, "downpic"

    const/4 v8, 0x0

    invoke-interface {v4, v5, v8}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v19

    .line 113
    .local v19, downpic:Z
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    move/from16 v0, v19

    invoke-static {v0, v4}, Lcom/netease/newsreader/util/Tools;->isshowimg(ZLandroid/content/Context;)Z

    move-result v4

    if-eqz v4, :cond_4

    .line 114
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_image:Landroid/widget/ImageView;

    move-object/from16 v0, v23

    invoke-virtual {v3, v0, v4}, Lcom/netease/newsreader/util/BaseImageDownloader;->downloadVoteImage(Ljava/lang/String;Landroid/widget/ImageView;)V

    .line 120
    :goto_0
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->map:Ljava/util/Map;

    const-string v8, "digest"

    invoke-interface {v5, v8}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v18

    .line 122
    .local v18, digest:Ljava/lang/String;
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_digest:Landroid/widget/TextView;

    invoke-virtual/range {v18 .. v18}, Ljava/lang/String;->length()I

    move-result v5

    const/16 v8, 0x2d

    if-le v5, v8, :cond_2

    new-instance v5, Ljava/lang/StringBuilder;

    const/4 v8, 0x0

    const/16 v9, 0x2b

    move-object/from16 v0, v18

    invoke-virtual {v0, v8, v9}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v8

    invoke-static {v8}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-direct {v5, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v8, ".."

    invoke-virtual {v5, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v18

    .end local v18           #digest:Ljava/lang/String;
    :cond_2
    move-object/from16 v0, v18

    invoke-virtual {v4, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 124
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_question:Landroid/widget/TextView;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    move-object/from16 v0, p0

    iget-object v8, v0, Lcom/netease/newsreader/util/GalleryViewItem;->map:Ljava/util/Map;

    const-string v9, "question"

    invoke-interface {v8, v9}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v8

    invoke-virtual {v5, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 125
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_date:Landroid/widget/TextView;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    move-object/from16 v0, p0

    iget-object v8, v0, Lcom/netease/newsreader/util/GalleryViewItem;->map:Ljava/util/Map;

    const-string v9, "date"

    invoke-interface {v8, v9}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v8

    invoke-virtual {v5, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 127
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_image:Landroid/widget/ImageView;

    new-instance v5, Lcom/netease/newsreader/util/GalleryViewItem$4;

    move-object/from16 v0, p0

    invoke-direct {v5, v0}, Lcom/netease/newsreader/util/GalleryViewItem$4;-><init>(Lcom/netease/newsreader/util/GalleryViewItem;)V

    invoke-virtual {v4, v5}, Landroid/widget/ImageView;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V

    .line 137
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    invoke-virtual {v4}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v16

    check-cast v16, Lcom/netease/newsreader/activity/MyApplication;

    .line 138
    .local v16, app:Lcom/netease/newsreader/activity/MyApplication;
    invoke-virtual/range {v16 .. v16}, Lcom/netease/newsreader/activity/MyApplication;->getSQLiteDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v4

    move-object/from16 v0, p0

    iput-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->db:Landroid/database/sqlite/SQLiteDatabase;

    .line 139
    move-object/from16 v0, p0

    iget-object v8, v0, Lcom/netease/newsreader/util/GalleryViewItem;->db:Landroid/database/sqlite/SQLiteDatabase;

    const-string v9, "vote_table"

    const/4 v4, 0x1

    new-array v10, v4, [Ljava/lang/String;

    const/4 v4, 0x0

    const-string v5, "vote_id"

    aput-object v5, v10, v4

    .line 140
    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "vote_id="

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->map:Ljava/util/Map;

    const-string v11, "vote_id"

    invoke-interface {v5, v11}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    const/4 v12, 0x0

    const/4 v13, 0x0

    const/4 v14, 0x0

    const-string v15, "auto_id desc"

    .line 139
    invoke-virtual/range {v8 .. v15}, Landroid/database/sqlite/SQLiteDatabase;->query(Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v17

    .line 142
    .local v17, cur:Landroid/database/Cursor;
    invoke-interface/range {v17 .. v17}, Landroid/database/Cursor;->getCount()I

    move-result v20

    .line 143
    .local v20, flag:I
    invoke-interface/range {v17 .. v17}, Landroid/database/Cursor;->close()V

    .line 145
    new-instance v28, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v4, -0x2

    const/4 v5, -0x2

    move-object/from16 v0, v28

    invoke-direct {v0, v4, v5}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    .line 146
    .local v28, p:Landroid/widget/LinearLayout$LayoutParams;
    invoke-interface/range {p3 .. p3}, Ljava/util/List;->size()I

    move-result v27

    .line 147
    .local v27, len:I
    const/4 v4, 0x7

    move/from16 v0, v27

    if-le v0, v4, :cond_3

    const/16 v27, 0x7

    .line 148
    :cond_3
    move/from16 v0, v27

    new-array v0, v0, [Landroid/widget/ImageView;

    move-object/from16 v24, v0

    .line 150
    .local v24, imgs:[Landroid/widget/ImageView;
    const/16 v21, 0x0

    .local v21, i:I
    :goto_1
    move/from16 v0, v21

    move/from16 v1, v27

    if-lt v0, v1, :cond_5

    .line 162
    packed-switch p2, :pswitch_data_0

    .line 228
    :goto_2
    new-instance v29, Landroid/widget/TableLayout$LayoutParams;

    const/4 v4, -0x1

    const/4 v5, -0x2

    move-object/from16 v0, v29

    invoke-direct {v0, v4, v5}, Landroid/widget/TableLayout$LayoutParams;-><init>(II)V

    .line 229
    .local v29, params:Landroid/widget/LinearLayout$LayoutParams;
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->map:Ljava/util/Map;

    const-string v5, "vote_id"

    invoke-interface {v4, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/String;

    move-object/from16 v0, p0

    invoke-virtual {v0, v4}, Lcom/netease/newsreader/util/GalleryViewItem;->setTag(Ljava/lang/Object;)V

    .line 230
    move-object/from16 v0, p0

    move-object/from16 v1, v26

    move-object/from16 v2, v29

    invoke-virtual {v0, v1, v2}, Lcom/netease/newsreader/util/GalleryViewItem;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 232
    return-void

    .line 116
    .end local v16           #app:Lcom/netease/newsreader/activity/MyApplication;
    .end local v17           #cur:Landroid/database/Cursor;
    .end local v20           #flag:I
    .end local v21           #i:I
    .end local v24           #imgs:[Landroid/widget/ImageView;
    .end local v27           #len:I
    .end local v28           #p:Landroid/widget/LinearLayout$LayoutParams;
    .end local v29           #params:Landroid/widget/LinearLayout$LayoutParams;
    :cond_4
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_image:Landroid/widget/ImageView;

    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f02010c

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    goto/16 :goto_0

    .line 151
    .restart local v16       #app:Lcom/netease/newsreader/activity/MyApplication;
    .restart local v17       #cur:Landroid/database/Cursor;
    .restart local v20       #flag:I
    .restart local v21       #i:I
    .restart local v24       #imgs:[Landroid/widget/ImageView;
    .restart local v27       #len:I
    .restart local v28       #p:Landroid/widget/LinearLayout$LayoutParams;
    :cond_5
    new-instance v22, Landroid/widget/ImageView;

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    move-object/from16 v0, v22

    invoke-direct {v0, v4}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    .line 152
    .local v22, img:Landroid/widget/ImageView;
    if-nez v21, :cond_6

    .line 153
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    invoke-virtual {v4}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    const v5, 0x7f02010a

    invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v4

    move-object/from16 v0, v22

    invoke-virtual {v0, v4}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 154
    aput-object v22, v24, v21

    .line 159
    :goto_3
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_flag_layout:Landroid/widget/LinearLayout;

    aget-object v5, v24, v21

    move-object/from16 v0, v28

    invoke-virtual {v4, v5, v0}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 150
    add-int/lit8 v21, v21, 0x1

    goto :goto_1

    .line 156
    :cond_6
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    invoke-virtual {v4}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    const v5, 0x7f02010f

    invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v4

    move-object/from16 v0, v22

    invoke-virtual {v0, v4}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 157
    aput-object v22, v24, v21

    goto :goto_3

    .line 164
    .end local v22           #img:Landroid/widget/ImageView;
    :pswitch_0
    move-object/from16 v0, p0

    move-object/from16 v1, v24

    move/from16 v2, p2

    invoke-direct {v0, v1, v2}, Lcom/netease/newsreader/util/GalleryViewItem;->setVoteFlag([Landroid/widget/ImageView;I)V

    .line 165
    if-lez v20, :cond_7

    .line 166
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_is_can:Landroid/widget/TextView;

    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b003c

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 167
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b0039

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 168
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->voteSeeListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto/16 :goto_2

    .line 170
    :cond_7
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_is_can:Landroid/widget/TextView;

    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b003d

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 171
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b0038

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 172
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->voteDoListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto/16 :goto_2

    .line 176
    :pswitch_1
    move-object/from16 v0, p0

    move-object/from16 v1, v24

    move/from16 v2, p2

    invoke-direct {v0, v1, v2}, Lcom/netease/newsreader/util/GalleryViewItem;->setVoteFlag([Landroid/widget/ImageView;I)V

    .line 177
    if-lez v20, :cond_8

    .line 178
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_is_can:Landroid/widget/TextView;

    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b003c

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 181
    :goto_4
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b0039

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 182
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->voteSeeListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto/16 :goto_2

    .line 180
    :cond_8
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_is_can:Landroid/widget/TextView;

    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b003b

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_4

    .line 185
    :pswitch_2
    move-object/from16 v0, p0

    move-object/from16 v1, v24

    move/from16 v2, p2

    invoke-direct {v0, v1, v2}, Lcom/netease/newsreader/util/GalleryViewItem;->setVoteFlag([Landroid/widget/ImageView;I)V

    .line 186
    if-lez v20, :cond_9

    .line 187
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_is_can:Landroid/widget/TextView;

    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b003c

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 190
    :goto_5
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b0039

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 191
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->voteSeeListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto/16 :goto_2

    .line 189
    :cond_9
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_is_can:Landroid/widget/TextView;

    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b003b

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_5

    .line 194
    :pswitch_3
    move-object/from16 v0, p0

    move-object/from16 v1, v24

    move/from16 v2, p2

    invoke-direct {v0, v1, v2}, Lcom/netease/newsreader/util/GalleryViewItem;->setVoteFlag([Landroid/widget/ImageView;I)V

    .line 195
    if-lez v20, :cond_a

    .line 196
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_is_can:Landroid/widget/TextView;

    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b003c

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 199
    :goto_6
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b0039

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 200
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->voteSeeListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto/16 :goto_2

    .line 198
    :cond_a
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_is_can:Landroid/widget/TextView;

    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b003b

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_6

    .line 203
    :pswitch_4
    move-object/from16 v0, p0

    move-object/from16 v1, v24

    move/from16 v2, p2

    invoke-direct {v0, v1, v2}, Lcom/netease/newsreader/util/GalleryViewItem;->setVoteFlag([Landroid/widget/ImageView;I)V

    .line 204
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_is_can:Landroid/widget/TextView;

    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b003b

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 205
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b0039

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 206
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->voteSeeListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto/16 :goto_2

    .line 209
    :pswitch_5
    move-object/from16 v0, p0

    move-object/from16 v1, v24

    move/from16 v2, p2

    invoke-direct {v0, v1, v2}, Lcom/netease/newsreader/util/GalleryViewItem;->setVoteFlag([Landroid/widget/ImageView;I)V

    .line 210
    if-lez v20, :cond_b

    .line 211
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_is_can:Landroid/widget/TextView;

    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b003c

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 214
    :goto_7
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b0039

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 215
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->voteSeeListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto/16 :goto_2

    .line 213
    :cond_b
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_is_can:Landroid/widget/TextView;

    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b003b

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_7

    .line 218
    :pswitch_6
    move-object/from16 v0, p0

    move-object/from16 v1, v24

    move/from16 v2, p2

    invoke-direct {v0, v1, v2}, Lcom/netease/newsreader/util/GalleryViewItem;->setVoteFlag([Landroid/widget/ImageView;I)V

    .line 219
    if-lez v20, :cond_c

    .line 220
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_is_can:Landroid/widget/TextView;

    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b003c

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 223
    :goto_8
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b0039

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 224
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/netease/newsreader/util/GalleryViewItem;->voteSeeListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto/16 :goto_2

    .line 222
    :cond_c
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_is_can:Landroid/widget/TextView;

    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v8, 0x7f0b003b

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_8

    .line 162
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_4
        :pswitch_5
        :pswitch_6
    .end packed-switch
.end method

.method static synthetic access$0(Lcom/netease/newsreader/util/GalleryViewItem;)Landroid/content/Context;
    .locals 1
    .parameter

    .prologue
    .line 43
    iget-object v0, p0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic access$1(Lcom/netease/newsreader/util/GalleryViewItem;)Landroid/database/sqlite/SQLiteDatabase;
    .locals 1
    .parameter

    .prologue
    .line 49
    iget-object v0, p0, Lcom/netease/newsreader/util/GalleryViewItem;->db:Landroid/database/sqlite/SQLiteDatabase;

    return-object v0
.end method

.method static synthetic access$2(Lcom/netease/newsreader/util/GalleryViewItem;)Ljava/util/Map;
    .locals 1
    .parameter

    .prologue
    .line 44
    iget-object v0, p0, Lcom/netease/newsreader/util/GalleryViewItem;->map:Ljava/util/Map;

    return-object v0
.end method

.method static synthetic access$3(Lcom/netease/newsreader/util/GalleryViewItem;)Landroid/view/GestureDetector;
    .locals 1
    .parameter

    .prologue
    .line 51
    iget-object v0, p0, Lcom/netease/newsreader/util/GalleryViewItem;->gestureDetector:Landroid/view/GestureDetector;

    return-object v0
.end method

.method private setVoteFlag([Landroid/widget/ImageView;I)V
    .locals 4
    .parameter "imgs"
    .parameter "p"

    .prologue
    .line 235
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    array-length v1, p1

    if-lt v0, v1, :cond_0

    .line 248
    return-void

    .line 236
    :cond_0
    if-nez v0, :cond_2

    .line 237
    if-ne v0, p2, :cond_1

    .line 238
    aget-object v1, p1, v0

    invoke-virtual {p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f02010a

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 235
    :goto_1
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 240
    :cond_1
    aget-object v1, p1, v0

    invoke-virtual {p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f020109

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    goto :goto_1

    .line 242
    :cond_2
    if-ne v0, p2, :cond_3

    .line 243
    aget-object v1, p1, v0

    invoke-virtual {p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f020110

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    goto :goto_1

    .line 245
    :cond_3
    aget-object v1, p1, v0

    invoke-virtual {p0}, Lcom/netease/newsreader/util/GalleryViewItem;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f02010f

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    goto :goto_1
.end method


# virtual methods
.method protected seeVoteResult()V
    .locals 5

    .prologue
    .line 316
    new-instance v1, Landroid/content/Intent;

    iget-object v3, p0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    const-class v4, Lcom/netease/newsreader/activity/VoteSubmit;

    invoke-direct {v1, v3, v4}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 317
    .local v1, intent:Landroid/content/Intent;
    const/high16 v3, 0x1000

    invoke-virtual {v1, v3}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    .line 318
    new-instance v0, Landroid/os/Bundle;

    invoke-direct {v0}, Landroid/os/Bundle;-><init>()V

    .line 319
    .local v0, b:Landroid/os/Bundle;
    new-instance v2, Lcom/netease/newsreader/bean/VoteBean;

    invoke-direct {v2}, Lcom/netease/newsreader/bean/VoteBean;-><init>()V

    .line 321
    .local v2, vb:Lcom/netease/newsreader/bean/VoteBean;
    iget-object v3, p0, Lcom/netease/newsreader/util/GalleryViewItem;->map:Ljava/util/Map;

    const-string v4, "vote_id"

    invoke-interface {v3, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    invoke-virtual {v2, v3}, Lcom/netease/newsreader/bean/VoteBean;->setId(Ljava/lang/String;)V

    .line 322
    iget-object v3, p0, Lcom/netease/newsreader/util/GalleryViewItem;->map:Ljava/util/Map;

    const-string v4, "voteitem"

    invoke-interface {v3, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/util/List;

    invoke-virtual {v2, v3}, Lcom/netease/newsreader/bean/VoteBean;->setItemLsit(Ljava/util/List;)V

    .line 323
    iget-object v3, p0, Lcom/netease/newsreader/util/GalleryViewItem;->map:Ljava/util/Map;

    const-string v4, "question"

    invoke-interface {v3, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    invoke-virtual {v2, v3}, Lcom/netease/newsreader/bean/VoteBean;->setItemQuestion(Ljava/lang/String;)V

    .line 325
    const-string v3, "votebean"

    invoke-virtual {v0, v3, v2}, Landroid/os/Bundle;->putSerializable(Ljava/lang/String;Ljava/io/Serializable;)V

    .line 326
    const-string v3, "already_vote"

    const/4 v4, 0x1

    invoke-virtual {v0, v3, v4}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 327
    const-string v3, "vb"

    invoke-virtual {v1, v3, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent;

    .line 328
    iget-object v3, p0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    invoke-virtual {v3, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    .line 329
    return-void
.end method

.method public setTheme()V
    .locals 5

    .prologue
    const v4, 0x7f08001b

    .line 59
    iget-object v0, p0, Lcom/netease/newsreader/util/GalleryViewItem;->mThemeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    iget-object v1, p0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    const v3, 0x7f020086

    invoke-virtual {v0, v1, v2, v3}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setViewBackgroud(Landroid/content/Context;Landroid/view/View;I)V

    .line 60
    iget-object v0, p0, Lcom/netease/newsreader/util/GalleryViewItem;->mThemeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    iget-object v1, p0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_submit:Landroid/widget/Button;

    const v3, 0x7f080027

    invoke-virtual {v0, v1, v2, v3}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setTextViewColor(Landroid/content/Context;Landroid/widget/TextView;I)V

    .line 61
    iget-object v0, p0, Lcom/netease/newsreader/util/GalleryViewItem;->mThemeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    iget-object v1, p0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_digest:Landroid/widget/TextView;

    const v3, 0x7f08002b

    invoke-virtual {v0, v1, v2, v3}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setTextViewColor(Landroid/content/Context;Landroid/widget/TextView;I)V

    .line 62
    iget-object v0, p0, Lcom/netease/newsreader/util/GalleryViewItem;->mThemeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    iget-object v1, p0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_digest:Landroid/widget/TextView;

    const v3, 0x7f020102

    invoke-virtual {v0, v1, v2, v3}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setViewBackgroud(Landroid/content/Context;Landroid/view/View;I)V

    .line 64
    iget-object v0, p0, Lcom/netease/newsreader/util/GalleryViewItem;->mThemeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    iget-object v1, p0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_date:Landroid/widget/TextView;

    invoke-virtual {v0, v1, v2, v4}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setTextViewColor(Landroid/content/Context;Landroid/widget/TextView;I)V

    .line 65
    iget-object v0, p0, Lcom/netease/newsreader/util/GalleryViewItem;->mThemeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    iget-object v1, p0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_is_can:Landroid/widget/TextView;

    invoke-virtual {v0, v1, v2, v4}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setTextViewColor(Landroid/content/Context;Landroid/widget/TextView;I)V

    .line 66
    iget-object v0, p0, Lcom/netease/newsreader/util/GalleryViewItem;->mThemeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    iget-object v1, p0, Lcom/netease/newsreader/util/GalleryViewItem;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lcom/netease/newsreader/util/GalleryViewItem;->vote_question:Landroid/widget/TextView;

    const v3, 0x7f08001d

    invoke-virtual {v0, v1, v2, v3}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setTextViewColor(Landroid/content/Context;Landroid/widget/TextView;I)V

    .line 68
    return-void
.end method
